package cn.yuxiaoyuan.config;

import cn.yuxiaoyuan.properties.WechatProperties;
import cn.yuxiaoyuan.template.WechatLoginTemplate;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author solargen
 * @version 1.0
 * @date 2025/6/16 10:34
 */
@Configuration
@EnableConfigurationProperties({WechatProperties.class})
public class WechatLoginAutoConfiguration {
    @Bean
    public WechatLoginTemplate wechatLoginTemplate(WechatProperties properties){//spring会自动给你注入进来
        return new WechatLoginTemplate(properties);
    }
}
